//
//  CityHeaderView.m
//  OnionHome
//
//  Created by fengjie on 2019/9/19.
//  Copyright © 2019 FengJie. All rights reserved.
//

#import "CityHeaderView.h"

@implementation CityHeaderView
- (id) initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        [self addSubview:self.titleLabel];
        self.backgroundColor = KWhiteColor;
        self.contentView.backgroundColor = KWhiteColor;
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.top.mas_equalTo(0);
            make.left.mas_equalTo(20);
        }];
    }
    return self;
}
- (void) layoutSubviews
{
    [super layoutSubviews];
    self.backgroundColor = KWhiteColor;
//    [self.titleLabel setFrame:CGRectMake(16, 0, self.frame.size.width - 16, self.frame.size.height)];
}
#pragma mark - Getter
- (UILabel *) titleLabel
{
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = PingFangSC_Medium(14);
        _titleLabel.textColor = UIColorFromRGB(0x454F44);
        _titleLabel.backgroundColor = KClearColor;
    }
    return _titleLabel;
}

@end
